package day07.testThree;

import java.util.Date;

public class Role {
    private String name;
    private int age;

    public Role(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}

class Student extends Role {
    private int studentID;
    private int classs;

    public Student(String name, int age, int studentID, int classs) {
        super(name, age);
        this.studentID = studentID;
        this.classs = classs;
    }

    public int getStudentID() {
        return studentID;
    }

    public void setStudentID(int studentID) {
        this.studentID = studentID;
    }

    public int getClasss() {
        return classs;
    }

    public void setClasss(int classs) {
        this.classs = classs;
    }

    public void show() {
        System.out.println("我是" + getName() + ",年龄" + getAge() + "岁。学号是" + studentID + ",来自" + classs + "班。");
    }
}

class Employee extends Role {
    private int jobID;
    private Date date;
    private String jobTitle;

    public Employee(String name, int age, int jobID, Date date, String jobTitle) {
        super(name, age);
        this.jobID = jobID;
        this.date = date;
        this.jobTitle = jobTitle;
    }

    public int getJobID() {
        return jobID;
    }

    public void setJobID(int jobID) {
        this.jobID = jobID;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getJobTitle() {
        return jobTitle;
    }

    public void setJobTitle(String jobTitle) {
        this.jobTitle = jobTitle;
    }

    public void show() {
        System.out.println("我是" + getName() + ",年龄" + getAge() + "岁。工号是" + jobID + "" + date + "入职。是一名" + jobTitle);
    }
}
